做C#.net时有"System.Configuration"

来源:百度知道 编辑:UC知道 时间:2024/06/01 03:25:47
在做c#.net时出现“"System.Configuration.ConfiguratonSetings.AppSetings"已过时”的提示,请高手赐教?

1.0时是System.Configuration.ConfiguratonSetings.AppSetings
2.0是System.Configuration.ConfigurationManager.AppSettings

你在2.0写ConfiguratonSetings会有警告但不抱错,也能运行.
不过最好改成ConfigurationManager.那就不会有警告了.

你用的2.0了吧?应该用System.Configuration.ConfigurationManager.AppSettings